var t = getApp();

Page({
    data: {
        page: 1
    },
    onLoad: function(t) {
        this.getData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        if (!(this.data.current_page >= this.data.last_page)) {
            var t = this.data.page + 1;
            this.setData({
                page: t
            }), this.getMore();
        }
    },
    onShareAppMessage: function() {},
    gotoUrl: function(t) {
        var a = t.currentTarget.dataset.uid, e = t.currentTarget.dataset.url;
        "groupContributionDetailslog" == e ? wx.navigateTo({
            url: "/packageI/newGroup/groupContributionDetailslog/groupContributionDetailslog?id=" + a
        }) : "groupContributionDetails" == e && wx.navigateTo({
            url: "/packageI/newGroup/contributionDetail/contributionDetail?id=" + a
        });
    },
    getData: function() {
        var a = this, e = t.getNetAddresss("plugin.zhp-group-lottery.frontend.contribution.get-child-contribution");
        t._postNetWork({
            url: e,
            data: {
                page: this.data.page
            },
            success: function(t) {
                var e = t.data;
                1 == e.result ? (a.setData({
                    list: e.data.data,
                    current_page: e.data.current_page,
                    last_page: e.data.last_page,
                    gxz_name: e.data.gxz_name
                }), wx.setNavigationBarTitle({
                    title: "".concat(e.data.gxz_name)
                })) : wx.showToast({
                    title: e.msg,
                    duration: 1e3,
                    icon: "none"
                });
            }
        });
    },
    getMore: function() {
        var a = this, e = this, n = t.getNetAddresss("plugin.zhp-group-lottery.frontend.contribution.get-child-contribution");
        t._postNetWork({
            url: n,
            data: {
                page: e.data.page
            },
            success: function(t) {
                var n = t.data;
                1 == n.result ? a.setData({
                    list: e.data.list.concat(n.data.data),
                    current_page: n.data.current_page,
                    last_page: n.data.last_page
                }) : wx.showToast({
                    title: n.msg,
                    duration: 1e3,
                    icon: "none"
                });
            }
        });
    }
});